﻿#pragma once
#include "afxdialogex.h"
#include <string>
#include <vector>
// CScanUi 对话框
#include "XButton.h"
struct MyTreeData {
	DWORD  parent;
	DWORD uiaddress;
	POINT  pos;
	SIZE  s;
	HTREEITEM treeItem;
	HTREEITEM parentTreeItem;
	std::wstring str;
	std::wstring name;
};

class CScanUi : public CDialogEx
{
	DECLARE_DYNAMIC(CScanUi)

public:
	HTREEITEM FindData(HTREEITEM htvi, LPARAM lParam);
	CScanUi(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CScanUi();
	virtual BOOL OnInitDialog();
// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG2 };
#endif

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedOk();
	//CTreeCtrl m_uitree;
	HWND m_gameWnd;
	std::vector<MyTreeData> m_treedata;
	afx_msg void OnBnClickedCancel();
	XButton m_mouse_btn;
	afx_msg void OnMove(int x, int y);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	CTreeCtrl m_tree1;
	CEdit m_uiname_edit;
	CEdit m_parentName_edit;
	CEdit m_pos_edit;
	afx_msg void OnNMDblclkTree1(NMHDR* pNMHDR, LRESULT* pResult);
};
